{* This template holds the basic surrounding structure of an html page. Variables: SEO Description = {$page_metadescription} SEO Keywords = {$page_metawords} SEO Page title = {$page_title} Company Name = {$company_name} *}
<!DOCTYPE html>
<html>
<head>
<meta name="Description" content="{$page_metadescription}" />
<meta name="Keywords" content="{$page_metawords}" />
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="Distribution" content="Global" />
<meta name="Robots" content="noindex,nofollow" />
<title>澳睿跑网站后台管理</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="/images/favico.png" rel="icon" type="image/png">

<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<script src="/admin/includes/js/jquery-1.11.3.min.js"></script>
<link rel="stylesheet" type="text/css" href="/admin/includes/css/jqui.css" />

<link rel="stylesheet" type="text/css" href="/admin/includes/js/timepicker/jquery.ui.timepicker.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/admin/includes/fileManager/css/elfinder.min.css">
<link rel="stylesheet" type="text/css" media="screen" href="/admin/includes/fileManager/css/theme.css">
<link rel="stylesheet" type="text/css" media="screen" href="/admin/includes/css/selectric.css">
<link rel="stylesheet" type="text/css" href="/admin/includes/css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="/admin/includes/css/styles.css" />

<link href='//fonts.googleapis.com/css?family=Raleway:400,500,600' rel='stylesheet' type='text/css'>

<script type="text/javascript">
		$(function() {
			 $( "input[type=submit]" ).button();
			$( '#bar-menu' ).accordion({ collapsible: true,
				active: false ,
				autoHeight: false,
				navigation: true,
				icons:false,
				animated: 'bounceslide'});
		});
	</script>

<!--[if lte IE 8]>
	  <script src="/admin/includes/js/respond.min.js"></script>
      <script src="/admin/includes/js/html5shiv.js"></script>
 	<![endif]-->


</head>
<body>

	{*提示弹窗*}
	<div id="alertBox" style="display:none;z-index:100000;position:fixed;bottom:-10px;left:10%;right:10%;padding-bottom:5%;text-align:center;border:2px solid #5bc0de;background:rgba(242, 222, 222,.8);border-bottom:0;border-radius:10px;">
		<h3 id="alertText1"></h3>
		<h3 id="alertText2Container" style="display:none;"><b id="alertText2Time"></b>s后<span id="alertText2"></span></h3>
	</div>
	<script>
		var commonAlertBoxTimer=null,commonAlertBoxLimitTimer=null;
		function commonAlertBox(txt1,txt2,limitTime){
			if(txt1){
				clearTimeout(commonAlertBoxTimer);
				$("#alertText1").html(txt1);
				if(txt2 && limitTime) {
					var currentTime=limitTime;
					clearInterval(commonAlertBoxLimitTimer);
					$("#alertText2").html(txt2);
					$("#alertText2Time").html(currentTime--);
					$("#alertText2Container").show();
					commonAlertBoxLimitTimer=setInterval(function(){
						if(currentTime<0){
							clearInterval(commonAlertBoxLimitTimer);
							$("#alertText2Container").hide();
							commonAlertBoxLimitTimer=null;
							return false;
						}
						$("#alertText2Time").html(currentTime--);
					},1000);
				}else{
					console.warn("Args[1] and args[2] mast exist simultaneously.");
				}
				$("#alertBox").slideDown(300,function(){
					commonAlertBoxTimer = setTimeout(function(){
						$("#alertBox").slideUp(300);
						clearTimeout(commonAlertBoxTimer);
						commonAlertBoxTimer=null;
					},3000);
				});
			}else{
				console.warn("CommonAlertBox() mast has a argument.");
			}
		}
	</script>

	<div class='container'>
	
		{block name=nav}{/block}
		<div class="row">
		<div class="col-sm-12">
		<div class="masthead">
			<!--<div id="logo">
			</div>-->
			<!-- end of logo -->
		</div>
		</div>
		</div>
		<!-- end ofcontainer_16 -->
		{if $admin.id && $important_news}
		<div class="row imp-notice">
			<div class="col-sm-12 form">
				<b>Important news</b><button class="close" aria-hidden="true" onclick="$('.imp-notice').fadeOut(); HideNews();" type="button">×</button>
			</div>
			{foreach $important_news as $n}
				<div class="col-sm-12">
					<h3 class="title">{$n.listing_name} <span><small> - {$n.news_start_date|date_format:"%Y-%m-%d"}</small></span>
					</h3>
					<p>{$n.listing_content1}</p>
				</div>
			{/foreach}
		</div>
		{/if}
		
		{if $admin.id && ($admin.level eq 1 || ($admin.level eq 2 && $request.arg1|strstr:"members/existing") )}
		<div class="row">
			<div class="col-sm-12" id="selector">
				<div class="input-group">
					<span class="input-group-addon"><span class="glyphicon glyphicon-search"></span></span>
					<input type="hidden" name="formToken" id="formToken" value="{$token}" />
					<input type="text" id="query" class="form-control" placeholder="搜索姓名，电子邮件，学生，手机号或订单号码" onkeyup="if(event.keyCode == 13 || (this.value.length > 2 && (event.keyCode > 47 || event.keyCode == 8 || event.keyCode == 32) )) { FindMember(); }">
				</div>
				<div id="found-members"></div>
			</div>
		</div>
		{/if}
		<div class="row">
			<div class="col-sm-12">
				
				
				<!--  block body start -->
				{block name=body}{/block}
				<!--  block body end -->
			</div>
		</div>
		{block name=footer}{/block}
		
		
		
		<script type="text/javascript">
		$(document).ready(function(){
			tinyMCEinit();
		});

		function tinyMCEinit(){
			$('textarea.tinymce').tinymce({
				// Location of TinyMCE script
				script_url : '/admin/includes/js/tiny_mce/tiny_mce.js',

				// General options
				theme : "advanced",
				plugins : "autolink,lists,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking",

				// Theme options
				theme_advanced_buttons1 : "forecolor,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
				theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,file,cleanup,code",
				theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media",
				theme_advanced_buttons4 : "",
				theme_advanced_toolbar_location : "top",
				theme_advanced_toolbar_align : "left",
				theme_advanced_statusbar_location : "bottom",
				theme_advanced_resizing : true,
			{if $request.arg1|strstr:'members/'}
				relative_urls : false,
				remove_script_host : false,
				convert_urls : true,
			{else}
				convert_urls : false,
			{/if}
				content_css : '/includes/css/bootstrap.min.css,/includes/css/custom.css,/admin/includes/css/tinymce.css',
				file_browser_callback : 'elFinderBrowser'
			});


		}
		
		function elFinderBrowser (field_name, url, type, win) {
            var cmsURL = '/admin/includes/fileManager/elfinder.php';    // script URL - use an absolute path!
            if (cmsURL.indexOf("?") < 0) {
                //add the type as the only query parameter
                cmsURL = cmsURL + "?type=" + type;
            }
            else {
                //add the type as an additional query parameter
                // (PHP session ID is now included if there is one at all)
                cmsURL = cmsURL + "&type=" + type;
            }

            tinyMCE.activeEditor.windowManager.open({
                file : cmsURL,
                title : 'elFinder 2.0',
                width : 900,
                height : 450,
                resizable : "yes",
                inline : "yes",  // This parameter only has an effect if you use the inlinepopups plugin!
                popup_css : false, // Disable TinyMCE's default popup CSS
                close_previous : "no"
            }, {
                window : win,
                input : field_name
            });
            return false;
        }
	</script>
	</div>
	
	<div class="notification" id="form-error" style="display:none;">
		<img alt="success" src="/admin/images/warning.png" width="28" height="28"/>
		<div style="display:inline;" id="form-error-msg"></div>
		<button type="button" class="close pull-right" onclick="$('#form-error').slideUp();">x</button>
	</div>
	<div class="notification" id="edited" style="display:none;">
		<img alt="success" src="/admin/images/success.png" width="28" height="28" /><b>该项目已成功编辑。</b>
		<button type="button" class="close pull-right" onclick="$('#edited').slideUp();">x</button>
	</div>
	<div class="notification" id="deleted" style="display:none;">
		<img alt="success" src="/admin/images/success.png" width="28" height="28" /><b>该项目已成功删除。</b>
		<button type="button" class="close pull-right" onclick="$('#deleted').slideUp();">x</button>
	</div>
	<div class="notification" id="warning" style="display:none;">
		<img alt="error" src="/admin/images/warning.png" width="28" height="28" /><b>存在错误，请检查所填字段是否正确。</b>
		<button type="button" class="close pull-right" onclick="$('#warning').slideUp();">x</button>
	</div>
	<div class="notification" id="error" style="display:none;">
		<img alt="error" src="/admin/images/warning.png" width="28" height="28" /><b>发生未知错误。</b>
		<button type="button" class="close pull-right" onclick="$('#error').slideUp();">x</button>
	</div>
	<div class="notification" id="sent" style="display:none;">
		<img alt="success" src="/admin/images/success.png" width="28" height="28" /><b>电子邮件已成功发送。</b>
		<button type="button" class="close pull-right" onclick="$('#sent').slideUp();">x</button>
	</div>
	{if $notice neq ''}
		<script>
			$('#{$notice}').slideDown();
			setTimeout(function(){
				$('#{$notice}').slideUp();
	    	},10000);
		</script>
	{/if}
	
	<div class="modal fade bs-modal-lg" id="modal-elfinder" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
		<div class="modal-dialog modal-lg">
	    	<div class="modal-content">
	    		<div class="modal-header">
					<button class="close" aria-hidden="true" data-dismiss="modal" type="button">×</button>
					<h4 class="modal-title">选择文件</h4>
				</div>
	      		<div id="elfinder"></div>
			</div>
	  	</div>
	</div>

	<script src="/admin/includes/js/jquery-migrate-1.2.1.min.js"></script>
	<script src="/admin/includes/js/jquery-ui-1.10.2.min.js"></script>
	<script src="/admin/includes/js/datepicker-zh-CN.js"></script>
	<script src="/admin/includes/js/admin-general.js"></script>
	<script type="text/javascript" src="/admin/includes/js/jquery.selectric.min.js"></script>
	<script src="/admin/includes/js/tiny_mce/jquery.tinymce.js"></script>
	<script src="/admin/includes/js/timepicker/jquery.ui.timepicker.js"></script>
	<script src="/admin/includes/fileManager/js/elfinder.full.js"></script>
	<script src="/admin/includes/js/bootstrap.min.js"></script>
	{if $admin.id}
	<script src="/admin/includes/js/jquery.validate.min.js"></script>
	<script src="/admin/includes/js/custom.js?v=1.3"></script>
	<script src="/admin/includes/js/bootstrap-multiselect.js"></script>
	{/if}
{block name=tail}{/block}
</body>
</html>